home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / sun / volume1 / tooltool2.1c / patch01 < prev    next >
Encoding:
Internet Message Format  |  1989-07-12  |  9.1 KB

  1. Path: uunet!cs.utexas.edu!wasatch!mailrus!iuvax!rutgers!aramis.rutgers.edu!dartagnan.rutgers.edu!mcgrew
  2. From: mcgrew@dartagnan.rutgers.edu (Charles Mcgrew)
  3. Newsgroups: comp.sources.sun
  4. Subject: v01i040:  Patch #1 to Tooltool
  5. Message-ID: <Jul.12.16.01.14.1989.4757@dartagnan.rutgers.edu>
  6. Date: 12 Jul 89 20:01:53 GMT
  7. Organization: Rutgers Univ., New Brunswick, N.J.
  8. Lines: 270
  9. Approved: mcgrew@aramis.rutgers.edu
  10.  
  11. Submitted-by: chuck@trantor.harris-atd.com (Chuck Musciano)
  12. Posting-number: Volume 1, Issue 40
  13. Archive-name: tooltool2.1c/patch01
  14.  
  15.      This patch brings tooltool from version 2.1c to version 2.1d.
  16.  
  17.      This patch fixes three bugs: a problem in window sizing and positioning,
  18. a bug in setting the mouse coordinates when a mouse event occurs, and a typo
  19. in the scanner which reverses the & and && operators.
  20.  
  21. Chuck Musciano            ARPA  : chuck@trantor.harris-atd.com
  22. Harris Corporation         Usenet: ...!uunet!x102a!trantor!chuck
  23. PO Box 37, MS 3A/1912        AT&T  : (407) 727-6131
  24. Melbourne, FL 32902        FAX   : (407) 727-{5118,5227,4004}
  25.  
  26. #! /bin/sh
  27. # This is a shell archive.  Remove anything before this line, then unpack
  28. # it by saving it into a file and typing "sh file".  To overwrite existing
  29. # files, type "sh file -c".  You can also feed this as standard input via
  30. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  31. # will see the following message at the end:
  32. #        "End of shell archive."
  33. # Contents:  patch
  34. # Wrapped by chuck@melmac on Thu Jun 29 07:47:52 1989
  35. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  36. if test -f 'patch' -a "${1}" != "-c" ; then 
  37.   echo shar: Will not clobber existing file \"'patch'\"
  38. else
  39. echo shar: Extracting \"'patch'\" \(6871 characters\)
  40. sed "s/^X//" >'patch' <<'END_OF_FILE'
  41. X*** Makefile.orig    Thu Jun 29 07:43:38 1989
  42. X--- Makefile    Thu Jun  1 10:25:31 1989
  43. X***************
  44. X*** 42,48 ****
  45. X--- 42,50 ----
  46. X  patch: Makefile *.man *.[chy]
  47. X      rm -f patch temp
  48. X      -for i in Makefile *.man *.[chy] ; do \
  49. X+        cp orig/$$i $${i}.orig ; \
  50. X         diff -c $${i}.orig $$i >>temp ; \
  51. X+        rm $${i}.orig ; \
  52. X      done
  53. X      sed '/^No differences encountered/d' <temp >patch
  54. X      rm temp
  55. X***************
  56. X*** 49,55 ****
  57. X  
  58. X  newver:
  59. X      for i in Makefile *.[chy] ; do \
  60. X!        cp $$i $${i}.orig ; \
  61. X      done
  62. X  
  63. X  clean:
  64. X--- 51,57 ----
  65. X  
  66. X  newver:
  67. X      for i in Makefile *.[chy] ; do \
  68. X!        cp $$i orig/$$i ; \
  69. X      done
  70. X  
  71. X  clean:
  72. X*** events.c.orig    Thu Jun 29 07:43:43 1989
  73. X--- events.c    Thu Jun 29 07:32:25 1989
  74. X***************
  75. X*** 250,256 ****
  76. X         }
  77. X      if (tt_mouse[button][shift].defined == MOUSE_UNDEFINED)
  78. X         return(notify_next_event_func(tty, event, arg, type));
  79. X!     else if (tt_mouse[button][shift].defined == MOUSE_STRING)
  80. X         a = tt_mouse[button][shift].action;
  81. X      else if (tt_mouse[button][shift].defined == MOUSE_MENU) {
  82. X         a = (a_ptr) menu_show(tt_mouse[button][shift].menu, tty, event, 0);
  83. X--- 250,256 ----
  84. X         }
  85. X      if (tt_mouse[button][shift].defined == MOUSE_UNDEFINED)
  86. X         return(notify_next_event_func(tty, event, arg, type));
  87. X!     else if (tt_mouse[button][shift].defined == MOUSE_ACTION)
  88. X         a = tt_mouse[button][shift].action;
  89. X      else if (tt_mouse[button][shift].defined == MOUSE_MENU) {
  90. X         a = (a_ptr) menu_show(tt_mouse[button][shift].menu, tty, event, 0);
  91. X***************
  92. X*** 260,266 ****
  93. X--- 260,268 ----
  94. X            }
  95. X         }
  96. X      tt_mouse_x->value->number = x;
  97. X+     tt_mouse_x->value->kind = V_NUMBER;
  98. X      tt_mouse_y->value->number = y;
  99. X+     tt_mouse_y->value->kind = V_NUMBER;
  100. X      tt_do_action(a);
  101. X      return(NOTIFY_DONE);
  102. X  }
  103. X*** lex.c.orig    Thu Jun 29 07:43:51 1989
  104. X--- lex.c    Thu Jun 29 07:32:26 1989
  105. X***************
  106. X*** 123,130 ****
  107. X  PRIVATE    struct    {char    first;
  108. X           char    next;
  109. X           int    name;
  110. X!         } punc[] = {{'&',  '\0', LOGICAL_AND},
  111. X!                 {'&',  '&',  AND},
  112. X                  {'&',  '=',  ASSIGN_AND},
  113. X                  {':',  '\0', COLON},
  114. X                  {',',  '\0', COMMA},
  115. X--- 123,130 ----
  116. X  PRIVATE    struct    {char    first;
  117. X           char    next;
  118. X           int    name;
  119. X!         } punc[] = {{'&',  '\0', AND},
  120. X!                 {'&',  '&',  LOGICAL_AND},
  121. X                  {'&',  '=',  ASSIGN_AND},
  122. X                  {':',  '\0', COLON},
  123. X                  {',',  '\0', COMMA},
  124. X*** parse.y.orig    Thu Jun 29 07:43:54 1989
  125. X--- parse.y    Thu Jun 29 07:32:25 1989
  126. X***************
  127. X*** 980,986 ****
  128. X          ;
  129. X  
  130. X  mouse_value    :    shifts action
  131. X!                     { tt_mouse[curr_key][$1].defined = MOUSE_STRING;
  132. X                        tt_mouse[curr_key][$1].action = $2;
  133. X                      }
  134. X          |    shifts menu
  135. X--- 980,986 ----
  136. X          ;
  137. X  
  138. X  mouse_value    :    shifts action
  139. X!                     { tt_mouse[curr_key][$1].defined = MOUSE_ACTION;
  140. X                        tt_mouse[curr_key][$1].action = $2;
  141. X                      }
  142. X          |    shifts menu
  143. X*** patchlevel.h.orig    Thu Jun 29 07:43:56 1989
  144. X--- patchlevel.h    Thu Jun 29 07:34:56 1989
  145. X***************
  146. X*** 36,42 ****
  147. X  /*                   or without a .ttyswrc file entry.    */
  148. X  /*    25 Apr 89    2.1b    Fixed the handling of meta keys in the    */
  149. X  /*                   function key fix.            */
  150. X- /*                                    */
  151. X  /*     1 Jun 89    2.1c    Clarified wording of copyright notice.    */
  152. X  /*                                    */
  153. X  /************************************************************************/
  154. X--- 36,47 ----
  155. X  /*                   or without a .ttyswrc file entry.    */
  156. X  /*    25 Apr 89    2.1b    Fixed the handling of meta keys in the    */
  157. X  /*                   function key fix.            */
  158. X  /*     1 Jun 89    2.1c    Clarified wording of copyright notice.    */
  159. X+ /*    29 Jun 89    2.1d    Fixed bug in window sizing and screen    */
  160. X+ /*                   positioning.                */
  161. X+ /*                Fixed reversal of AND and LOGICAL_AND    */
  162. X+ /*                   in lex.c.                */
  163. X+ /*                Fixed bug in setting the value of     */
  164. X+ /*                   mouse_x and mouse_y.            */
  165. X  /*                                    */
  166. X  /************************************************************************/
  167. X*** symbols.c.orig    Thu Jun 29 07:43:58 1989
  168. X--- symbols.c    Thu Jun 29 07:32:23 1989
  169. X***************
  170. X*** 121,130 ****
  171. X  {    s_ptr    interval;
  172. X  
  173. X      tt_mouse_x = tt_find_symbol("mouse_x");
  174. X      tt_mouse_y = tt_find_symbol("mouse_y");
  175. X      interval = tt_find_symbol("interval");
  176. X      interval->value->kind |= V_INTERVAL;
  177. X      tt_delimiters = tt_find_symbol("delimiters");
  178. X!     tt_delimiters->value->kind = 0;
  179. X      tt_delimiters->value->str = " \t\n\r\"'";
  180. X  }
  181. X--- 121,132 ----
  182. X  {    s_ptr    interval;
  183. X  
  184. X      tt_mouse_x = tt_find_symbol("mouse_x");
  185. X+     tt_mouse_x->value->kind = V_NUMBER;
  186. X      tt_mouse_y = tt_find_symbol("mouse_y");
  187. X+     tt_mouse_y->value->kind = V_NUMBER;
  188. X      interval = tt_find_symbol("interval");
  189. X      interval->value->kind |= V_INTERVAL;
  190. X      tt_delimiters = tt_find_symbol("delimiters");
  191. X!     tt_delimiters->value->kind = V_NOTHING;
  192. X      tt_delimiters->value->str = " \t\n\r\"'";
  193. X  }
  194. X*** tooltool.h.orig    Thu Jun 29 07:44:00 1989
  195. X--- tooltool.h    Thu Jun 29 07:32:24 1989
  196. X***************
  197. X*** 107,113 ****
  198. X  /* The functions a mouse key can perform
  199. X   */
  200. X  #define        MOUSE_UNDEFINED        0
  201. X! #define        MOUSE_STRING        1
  202. X  #define        MOUSE_MENU        2
  203. X  
  204. X  /* The ways a choice gadget can be laid out
  205. X--- 107,113 ----
  206. X  /* The functions a mouse key can perform
  207. X   */
  208. X  #define        MOUSE_UNDEFINED        0
  209. X! #define        MOUSE_ACTION        1
  210. X  #define        MOUSE_MENU        2
  211. X  
  212. X  /* The ways a choice gadget can be laid out
  213. X***************
  214. X*** 359,365 ****
  215. X  
  216. X  /* A mouse record holds operation to be performed by one mouse
  217. X   * button/shift-state combination.  "Defined" is one of 
  218. X!  * MOUSE_{UNDEFINED,STRING,MENU}.  If MOUSE_STRING, "value" holds
  219. X   * the text to be transmitted.  If MOUSE_MENU, "menu" holds
  220. X   * the menu to be displayed.
  221. X   */
  222. X--- 359,365 ----
  223. X  
  224. X  /* A mouse record holds operation to be performed by one mouse
  225. X   * button/shift-state combination.  "Defined" is one of 
  226. X!  * MOUSE_{UNDEFINED,ACTION,MENU}.  If MOUSE_ACTION, "action" holds
  227. X   * the text to be transmitted.  If MOUSE_MENU, "menu" holds
  228. X   * the menu to be displayed.
  229. X   */
  230. X*** windows.c.orig    Thu Jun 29 07:44:02 1989
  231. X--- windows.c    Mon Jun 12 09:24:44 1989
  232. X***************
  233. X*** 306,311 ****
  234. X--- 306,318 ----
  235. X                   0);
  236. X         gadget_columns(tt_base_window);
  237. X         }
  238. X+ 
  239. X+     if (tty == NULL || tt_base_window->rows <= 0 || tt_base_window->columns <= 0) {
  240. X+        if (tty)
  241. X+           window_set(tty, WIN_SHOW, FALSE, 0);
  242. X+        if (tt_base_window->panel)
  243. X+           window_fit(tt_base_window->panel);
  244. X+        }
  245. X      window_fit(tt_base_window->frame);
  246. X  
  247. X      fr = (Rect *) window_get(tt_base_window->frame, FRAME_OPEN_RECT);
  248. X***************
  249. X*** 359,372 ****
  250. X      if (tty) {
  251. X         notify_interpose_event_func(tty, tty_handler, NOTIFY_SAFE);
  252. X         tt_ttymenu = (Menu) window_get(tty, WIN_MENU);
  253. X-        }
  254. X- 
  255. X-     if (tty == NULL || tt_base_window->rows <= 0 || tt_base_window->columns <= 0) {
  256. X-        if (tty)
  257. X-           window_set(tty, WIN_SHOW, FALSE, 0);
  258. X-        if (tt_base_window->panel)
  259. X-           window_fit(tt_base_window->panel);
  260. X-        window_fit(tt_base_window->frame);
  261. X         }
  262. X  
  263. X      fr = (Rect *) window_get(tt_base_window->frame, FRAME_OPEN_RECT);
  264. X--- 366,371 ----
  265. END_OF_FILE
  266. if test 6871 -ne `wc -c <'patch'`; then
  267.     echo shar: \"'patch'\" unpacked with wrong size!
  268. fi
  269. # end of 'patch'
  270. fi
  271. echo shar: End of shell archive.
  272. exit 0
  273.  
  274. Chuck Musciano                ARPA  : chuck@trantor.harris-atd.com
  275. Harris Corporation             Usenet: ...!uunet!x102a!trantor!chuck
  276. PO Box 37, MS 3A/1912            AT&T  : (407) 727-6131
  277. Melbourne, FL 32902            FAX   : (407) 727-{5118,5227,4004}
  278.  
  279. Oh yeah, laugh now!  But when the millions start pouring in, I'll be the one
  280. at Burger King, sucking down Whoppers at my own private table! --Al Bundy
  281.